home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Science
/
Asymptote Demo
/
Examples
/
Utility Scripts
/
powerlawfit
< prev
next >
Wrap
Text File
|
1994-05-07
|
403b
|
19 lines
% powerlawfit xmin xmax
% DESCRIPTION:
% For log-log graphs. Fit y = a0 + a1*x for x in the given range.
% ARGUMENTS:
% xmin = minimum x to include in fit
% xmax = maximum x to include in fit
% •Note:This script modifies the e vector and replaces the y data
% with the calclated fit.
rpn <x &1 < <x &2 > + <x &1 >= <x &2 <= * 0.0001 * + >e
fitxy 1
rpn a0 <x a1 * + >y
close